package cn.edu.sgu.www.mhxysy.dto.exp;

import cn.edu.sgu.www.mhxysy.dto.DataTransferObject;
import cn.edu.sgu.www.mhxysy.consts.CustomMessages;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Range;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Positive;

/**
 * @author 沐雨橙风ιε
 * @version 1.0
 */
@Data
@ApiModel
public class GradeExpDTO implements DataTransferObject {

    @ApiModelProperty(value = "ID")
    private Integer id;

    /**
     * 经验值
     */
    @Positive(message = "经验值" + CustomMessages.ILLEGAL)
    @NotNull(message = "经验值" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "经验值", required = true)
    private Long exp;

    /**
     * 等级
     */
    @Range(min = 1, max = 125, message = "等级" + CustomMessages.ILLEGAL)
    @NotNull(message = "等级" + CustomMessages.NOT_NULL)
    @ApiModelProperty(value = "等级", required = true)
    private Integer grade;

    /**
     * 经验类型ID
     */
    @Positive(message = "经验类型ID" + CustomMessages.ILLEGAL)
    @NotNull(message = "经验类型" + CustomMessages.ID_NOT_NULL)
    @ApiModelProperty(value = "经验类型ID", required = true)
    private Integer categoryId;
}